<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>scuwdt: xscuwdt_intr_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">scuwdt
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xscuwdt__intr__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xscuwdt_intr_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example using the Xilinx SCU Private Watchdog Timer driver (<a class="el" href="struct_x_scu_wdt.html" title="The XScuWdt driver instance data. ">XScuWdt</a>) and hardware in Timer mode using interrupts. </p>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<pre></pre><pre>MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
1.00a sdm  01/15/10 First release
2.5   asa  07/18/23 Added support for system device tree based
                    workflow decouplig flow.
                                  Interrupt wrapper support has also been added.
2.5   dp   09/08/23 Update example to stop wdt at end of the test
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3878b169befa50061eb50faa79407eaf"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscuwdt__intr__example_8c.html#a3878b169befa50061eb50faa79407eaf">ScuWdtIntrExample</a> (XScuGic *IntcInstancePtr, <a class="el" href="struct_x_scu_wdt.html">XScuWdt</a> *WdtInstancePtr, u16 WdtDeviceId, u16 WdtIntrId)</td></tr>
<tr class="memdesc:a3878b169befa50061eb50faa79407eaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function tests the functioning of the Scu Private WDT driver and hardware in Timer mode using interrupts.  <a href="#a3878b169befa50061eb50faa79407eaf">More...</a><br/></td></tr>
<tr class="separator:a3878b169befa50061eb50faa79407eaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xscuwdt__intr__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function to call the Scu Private Wdt interrupt example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function to call the Scu Private Wdt interrupt example. </p>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xscuwdt__intr__example_8c.html#a3878b169befa50061eb50faa79407eaf">ScuWdtIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a3878b169befa50061eb50faa79407eaf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ScuWdtIntrExample </td>
          <td>(</td>
          <td class="paramtype">XScuGic *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_scu_wdt.html">XScuWdt</a> *&#160;</td>
          <td class="paramname"><em>WdtInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>WdtDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>WdtIntrId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function tests the functioning of the Scu Private WDT driver and hardware in Timer mode using interrupts. </p>
<p>After one expiration of the timeout interval, an interrupt is generated and the Event flag bit is set in the watchdog interrupt status register.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a pointer to the instance of the XScuGic driver. </td></tr>
    <tr><td class="paramname">WdtInstancePtr</td><td>is a pointer to the instance of <a class="el" href="struct_x_scu_wdt.html" title="The XScuWdt driver instance data. ">XScuWdt</a> driver. </td></tr>
    <tr><td class="paramname">WdtDeviceId</td><td>is the Device ID of the <a class="el" href="struct_x_scu_wdt.html" title="The XScuWdt driver instance data. ">XScuWdt</a> device. </td></tr>
    <tr><td class="paramname">WdtIntrId</td><td>is the Interrupt Id of the <a class="el" href="struct_x_scu_wdt.html" title="The XScuWdt driver instance data. ">XScuWdt</a> device.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if successful, otherwise XST_FAILURE.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="struct_x_scu_wdt___config.html#ade7297db74ccde96bfc2e94f451b5a56">XScuWdt_Config::BaseAddr</a>, <a class="el" href="struct_x_scu_wdt.html#a6d670660d7b2dbb2cb2af9894f2d8562">XScuWdt::Config</a>, <a class="el" href="group___overview.html#ga1fee56fc3ec3c8b003e6ae0528703b1c">XScuWdt_CfgInitialize()</a>, <a class="el" href="group___overview.html#ga88489f11e8c766bd4ba2c725087b16fc">XSCUWDT_CONTROL_IT_ENABLE_MASK</a>, <a class="el" href="group___overview.html#gaf62532fc29f79a73a2a058d6e81586a6">XScuWdt_GetControlReg</a>, <a class="el" href="group___overview.html#ga48a52ba61af3b86522de83206703b0cf">XSCUWDT_ISR_EVENT_FLAG_MASK</a>, <a class="el" href="group___overview.html#ga51a62e1dedd6b0f5f45cd19305f09440">XSCUWDT_ISR_OFFSET</a>, <a class="el" href="group___overview.html#ga551b705d1ebbb530ac7a2a9752c8f5cb">XScuWdt_IsTimerExpired</a>, <a class="el" href="group___overview.html#ga7dca99f7a6158d27399eb355f40e3367">XScuWdt_LoadWdt</a>, <a class="el" href="group___overview.html#ga899e316b67b7eab6cec1f5b99df25e4d">XScuWdt_LookupConfig()</a>, <a class="el" href="group___overview.html#ga9487e2c385d8dc9cf5f1f27539ca079f">XScuWdt_RestartWdt</a>, <a class="el" href="group___overview.html#ga2d6d32ff992704d9b78f93ab00ebdf78">XScuWdt_SelfTest()</a>, <a class="el" href="group___overview.html#gaac6e3f570a91434e6e4066a7a6c5d333">XScuWdt_SetControlReg</a>, <a class="el" href="group___overview.html#ga816969d609034dc12371ca7bc8444bf3">XScuWdt_SetTimerMode</a>, <a class="el" href="group___overview.html#ga87a7a8230fc5fa80f64cb66210e596b8">XScuWdt_Start()</a>, <a class="el" href="group___overview.html#gae1493503cc6e52afa681f23329e9abef">XScuWdt_Stop()</a>, and <a class="el" href="group___overview.html#ga396641b45a7213c8c18a19485759fee4">XScuWdt_WriteReg</a>.</p>

<p>Referenced by <a class="el" href="xscuwdt__intr__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
